<HTML>
<HEAD>
<TITLE>DefaultProjectName - HandleEvents</TITLE>
<script type="text/javascript">
  var relPathToCommmon = "../../common/";
  var relPathToHelpDir = "../../common/help/";
</script>
<script type="text/javascript" src="../../common/jsdyn.js" language="JavaScript"></script>
<script type="text/javascript" src="../../common/js.js" language="JavaScript"></script>
<script type="text/javascript" src="leftmenu.js" language="JavaScript"></script>
<script type="text/javascript">
  var toSearchPage     = "_search','../../search";
  Body1();
</script>
<div class="headerPage">HandleEvents</div>
<div class="path"><a href="#" OnMouseOver="link('','../../index',this)" class="pathLink">OOXlib</A><img src="../../common/path-arrow.gif" class="path-arrow"><a href="#" OnMouseOver="link('_dir','include0',this)" class="pathLink">include</A><img src="../../common/path-arrow.gif" class="path-arrow"><a href="#" OnMouseOver="link('_class','CSimpleWindow4032',this)" class="pathLink">CSimpleWindow</A><img src="../../common/path-arrow.gif" class="path-arrow"><span class="pathNonLink">HandleEvents</span></div>
<script type="text/javascript">
 Body2();
 BodyLeftMenuStart();
WriteLeftMenu("","","","");
 BodyLeftMenuEnd();
 Body3();
</script>
<span class="tabInActive"><a href="#" OnMouseOver="linkTab('_member','HandleEvents2315919823','_description',this)" class="tabLinkInActive">Description</a></span>
<span class="tabActive"><a href="#" OnMouseOver="linkTab('_member','HandleEvents2315919823','_source',this)" class="tabLinkActive">Source</a></span>
<span class="tabInActive"><a href="#" OnMouseOver="linkTab('_member','HandleEvents2315919823','_callgraph',this)" class="tabLinkInActive">Call Graph</a></span>
<script type="text/javascript">
 Body4();
</script>
<div class="contentAirTop"></div>
<div class="paragraph2NoTopPadding">Start Line: 488</div>
<pre class="codeExamples">
bool <a href="#" onMouseOver="link('_member','HandleEvents2315919823',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>bool&nbsp;&nbsp;HandleEvents&nbsp;&nbsp;()',CAPTION,'<strong>Brief description</strong><BR>Handles events');" onMouseOut="return nd();">OOXlib::CSimpleWindow::HandleEvents</a>()
                                 {
    // Get an event.
    ::XEvent event;
    ::XNextEvent(<a href="#" onMouseOver="link('_member','m_pXServerConnection2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>CXServerConnection *&nbsp;&nbsp;m_pXServerConnection ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_pXServerConnection</a>-&gt;Get(), &amp;event);
    // Try to find the window.
    IWindow* window = NULL;
    if(event.xany.window == <a href="#" onMouseOver="link('_member','m_Window2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>::Window&nbsp;&nbsp;m_Window ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_Window</a>) {
        window = this;
    } else {
        int windowsCount = <a href="#" onMouseOver="link('_member','m_Windows2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>::std::vector< IWindow * >&nbsp;&nbsp;m_Windows ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_Windows</a>.size();
        for(int i = 0; i &lt; windowsCount; i++) {
            if(NULL != <a href="#" onMouseOver="link('_member','m_Windows2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>::std::vector< IWindow * >&nbsp;&nbsp;m_Windows ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_Windows</a>[i]) {
                if(event.xany.window == <a href="#" onMouseOver="link('_member','m_Windows2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>::std::vector< IWindow * >&nbsp;&nbsp;m_Windows ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_Windows</a>[i]-&gt;Get()) {
                    window = <a href="#" onMouseOver="link('_member','m_Windows2399711695',this); overLibDiagram();return overlib('<strong>Syntax</strong><BR>::std::vector< IWindow * >&nbsp;&nbsp;m_Windows ',CAPTION,'<strong>Brief description</strong><BR>');" onMouseOut="return nd();">m_Windows</a>[i];
                    break;
                }
            }
        }
    }
    // If not found - continue.
    if(NULL == window) {
        return true;
    }
    return window-&gt;RunEventHandler(event);
}
</pre><div class="contentAirBottom"></div>
<script type="text/javascript">
 Body5();
Statistics("","","","","");
 Body6();
SetPageTab('_member','_source');
</script>
